/*    */
package com.liang.nansheng.common.web.exception;
/*    */
/*    */

import com.liang.nansheng.common.enums.ResponseCode;

/*    */
/*    */ public class BusinessException extends RuntimeException
        /*    */ {
    /*    */   private ResponseCode responseCode;

    /*    */
    /*    */
    private BusinessException(ResponseCode responseCode, String message)
    /*    */ {
        /* 19 */
        super(message);
        /* 20 */
        this.responseCode = responseCode;
        /*    */
    }

    /*    */
    /*    */
    public static BusinessException build(ResponseCode responseCode, String message) {
        /* 24 */
        return new BusinessException(responseCode, message);
        /*    */
    }

    /*    */
    /*    */
    public static BusinessException build(ResponseCode responseCode) {
        /* 28 */
        return new BusinessException(responseCode, responseCode.getDesc());
        /*    */
    }

    /*    */
    /*    */
    public ResponseCode getResponseCode()
    /*    */ {
        /* 16 */
        return this.responseCode;
        /*    */
    }

    /*    */
    /*    */
    public void setResponseCode(ResponseCode responseCode)
    /*    */ {
        /* 13 */
        this.responseCode = responseCode;
    }

    /* 13 */
    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof BusinessException)) return false;
        BusinessException other = (BusinessException) o;
        if (!other.canEqual(this)) return false;
        Object this$responseCode = getResponseCode();
        Object other$responseCode = other.getResponseCode();
        return this$responseCode == null ? other$responseCode == null : this$responseCode.equals(other$responseCode);
    }

    /* 13 */
    protected boolean canEqual(Object other) {
        return other instanceof BusinessException;
    }

    /* 13 */
    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $responseCode = getResponseCode();
        result = result * 59 + ($responseCode == null ? 43 : $responseCode.hashCode());
        return result;
    }

    /* 13 */
    public String toString() {
        return "BusinessException(responseCode=" + getResponseCode() + ")";
    }
    /*    */
    /*    */
}

/* Location:           C:\maven\maven3.5\maven3.5\repositor\io\github\maliangnansheng\nansheng-common\3.3.4\nansheng-common-3.3.4.jar
 * Qualified Name:     com.liang.nansheng.common.web.exception.BusinessException
 * JD-Core Version:    0.6.2
 */